package com.up360.rapidcalc.aerolite.scene
{
    import com.up360.rapidcalc.aerolite.AeroliteCrisis;
    import com.up360.rapidcalc.aerolite.swc.Helper;
    
    import flash.display.Sprite;
    import flash.events.MouseEvent;

    /**
     * @author Tunie
     * @date   May 3, 2013
     */
    public class HelperPage extends Page
    {
        private var _ui:Helper;
        private var _content:Sprite;
        public function HelperPage(content:Sprite)
        {
            super();
            _content=content;
            
            _ui=new Helper();
            init();
            addChild(_ui);
        }
        
        override public function init():void
        {
            super.init();
            //
            _content.mouseChildren=false;
            //local
            _ui.x=100;
            //initevent
            _ui.btnStart.addEventListener(MouseEvent.CLICK,startClick);
        }
        
        override public function disruption():void
        {
            _ui.btnStart.removeEventListener(MouseEvent.CLICK,startClick);
            removeChild(_ui);
            _content=null;
            super.disruption();
        }
        
        
        
        protected function startClick(event:MouseEvent):void
        {
            trace("关闭对话框");
            _content.mouseChildren=true;
            AeroliteCrisis.instance.removeChild(this);
        }        
        
    }
}